<script>
  /*
  * Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
  * This file is part of RockStor.
  *
  * RockStor is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published
  * by the Free Software Foundation; either version 2 of the License,
  * or (at your option) any later version.
  *
  * RockStor is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  */
</script>
<div class="row">
  <div class="col-md-8">
    <div class="panel panel-default">
      {{#if groupname}}
      <div class="panel-heading">Create a new group</div>
      {{else}}
      <div class="panel-heading">Edit Group</div>
      {{/if}}

    <div class="panel-body">
      <form class="form-horizontal" id="group-create-form" name="aform">
        <div class="messages"></div>
        <div class="form-group">
          <label class="col-sm-4 control-label" for="groupname">Groupname
	    {{#unless groupname}}
            <span class="required"> *</span>
	    {{/unless}}
          </label>
	  {{#if groupname}}
          <label class="col-sm-4 control-label" style="text-align:left">{{groupname}}</label>
	  <div class="col-sm-4">
            <input class="form-control" type="hidden" id="groupname" name="groupname" value="{{groupname}}">
	  </div>
	  {{else}}
	  <div class="col-sm-4">
            <input class="form-control" type="text" id="groupname" name="groupname" placeholder="Groupname" title="Enter Group Name">
	  </div>
	  {{/if}}
        </div>
	<div class="form-group">
	  <div class="col-sm-offset-4 col-sm-8">
            <div class="checkbox">
              <label>
		{{#if group.admin}}
		<input type="checkbox" id="admin" name="admin" placeholder="Admin" checked="true">
		{{else}}
		<input type="checkbox" id="admin" name="admin" placeholder="Admin">
		{{/if}}
		Put this group under Rockstor management?
              </label>
            </div>
	  </div>
	</div>
	<div class="form-group">
	  <label class="col-sm-4 control-label">GID</label>
	    <div class="col-sm-4">
	      <input class="form-control" type="text" id="gid" name="gid" placeholder="Autogenerate" title="Enter a custom gid here or one will be autogenerated">
	    </div>
	</div>
        <div class="form-group">
	  <div class="col-sm-offset-4 col-sm-8">
            <button id="cancel" class="btn btn-default">Cancel</button>
            <button type="Submit" id="create-group" class="btn btn-primary">Submit</button>
	  </div>
        </div>
      </form>
    </div>
  </div>
</div>
